package com.example.mcdonaldapplication.info

class BannerImageBean {
    var imageRes: Int? = null
    var imageUrl: String? = null
    var title: String?
    var viewType: Int

    constructor(imageRes: Int?, title: String?, viewType: Int) {
        this.imageRes = imageRes
        this.title = title
        this.viewType = viewType
    }

    constructor(imageUrl: String?, title: String?, viewType: Int) {
        this.imageUrl = imageUrl
        this.title = title
        this.viewType = viewType
    }

    companion object {

        val testData1: List<BannerImageBean>
            get() {
                val list: MutableList<BannerImageBean> = ArrayList()
                list.add(
                    BannerImageBean(
                        com.example.mcdonaldapplication.R.drawable.ic_banner_img_1,
                        null,
                        1
                    )
                )
                list.add(
                    BannerImageBean(
                        com.example.mcdonaldapplication.R.drawable.ic_banner_img_2,
                        null,
                        1
                    )
                )
                list.add(
                    BannerImageBean(
                        com.example.mcdonaldapplication.R.drawable.ic_banner_img_3,
                        null,
                        1
                    )
                )
                return list
            }

        val testData2: List<BannerImageBean>
            get() {
                val list: MutableList<BannerImageBean> = ArrayList()
                list.add(
                    BannerImageBean(
                        com.example.mcdonaldapplication.R.drawable.shop_banner1,
                        null,
                        1
                    )
                )
                list.add(
                    BannerImageBean(
                        com.example.mcdonaldapplication.R.drawable.shop_banner2,
                        null,
                        1
                    )
                )
                list.add(
                    BannerImageBean(
                        com.example.mcdonaldapplication.R.drawable.shop_banner3,
                        null,
                        1
                    )
                )
                return list
            }

        //测试数据，如果图片链接失效请更换
        val testData3: List<BannerImageBean>
            get() {
                val list: MutableList<BannerImageBean> = ArrayList()
                list.add(
                    BannerImageBean(
                        com.example.mcdonaldapplication.R.drawable.ic_home_img_1,
                        null,
                        1
                    )
                )
                list.add(
                    BannerImageBean(
                        com.example.mcdonaldapplication.R.drawable.ic_home_img_2,
                        null,
                        1
                    )
                )
                list.add(
                    BannerImageBean(
                        com.example.mcdonaldapplication.R.drawable.ic_home_img_3,
                        null,
                        1
                    )
                )
                list.add(
                    BannerImageBean(
                        com.example.mcdonaldapplication.R.drawable.ic_home_img_4,
                        null,
                        1
                    )
                )
                return list
            }
    }
}